package com.michael.demo.springcloud.alibaba.consumer.service.fallback;

import com.michael.demo.springcloud.alibaba.consumer.service.EchoService;

/**
 * 类功能描述:
 * <pre>
 *   降级处理类
 * </pre>
 *
 * @author Michael
 * @version 1.0
 * @date 2021/03/31 14:35
 */
public class EchoServiceFallback implements EchoService {

    private Throwable throwable;

    public EchoServiceFallback(Throwable throwable) {
        this.throwable = throwable;
    }

    @Override
    public String echo(String str) {
        return "EchoServiceFallback.echo(" + str + ")";
    }

    @Override
    public String notFound() {
        return "EchoServiceFallback.notFound()";
    }

    @Override
    public String divide(Integer a, Integer b) {
        return "EchoServiceFallback.divide()";
    }
}
